﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UPNP.IO.ValueConverters
{
    internal sealed class DeviceReal4Converter : IDeviceValueConverter
    {
        public Type ManagedType
        {
            get { return typeof(double); }
        }

        public object FromDevice(string value)
        {
            return Convert.ToDouble(value, DeviceServiceQuery.SoapCulture);
        }

        public string ToDevice(object value)
        {
            return Convert.ToString(Convert.ToDouble(value, DeviceServiceQuery.SoapCulture));
        }
    }
}
